import { request } from '@/utils/request.js'

// 查询客户列表
export function getClientList(query) {
  return request({
    url: 'cloud/client/index',
    method: 'get',
    params: query
  })
}
// 查询项目列表
export function getProjectList(query) {
  return request({
    url: 'cloud/project/index',
    method: 'get',
    params: query
  })
}
// 客户绑定项目
export function bandProject(query) {
  return request({
    url: 'cloud/client/bindUserProject',
    method: 'post',
    data: query
  })
}
// 改变客户状态
export function changeStatus(query) {
  return request({
    url: 'cloud/client/changeStatus',
    method: 'post',
    data: query
  })
}
// 新增管理员
export function addAdminClient(query) {
  return request({
    url: 'cloud/client/add',
    method: 'post',
    data: query
  })
}
// 新增员工
export function addStaff(query) {
  return request({
    url: 'cloud/client/addStaff',
    method: 'post',
    data: query
  })
}
// 新增员工
export function updataPrw(query) {
  return request({
    url: 'cloud/client/modifyUserPassword',
    method: 'post',
    data: query
  })
}
//加载系统配置
export function getCnfig(query) {
  return request({
    url: 'cloud/config/index',
    method: 'get',
    data: query
  })
}

//加载重发模板列表
export function resendTemplate(query) {

  return request({
    url: 'cloud/resendTemplate/index',
    method: 'get',
    data: query
  })
}


//客服开关
export function ServiceSwitch(query) {
  return request({
    url: 'cloud/config/updateCustomerServiceSwitch',
    method: 'post',
    data: query
  })
}

//重打配置
export function updateResend(query) {
  return request({
    url: 'cloud/config/updateResend',
    method: 'post',
    data: query
  })
}